home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / ste / autoexec.lzh / SOURCE / MXALLOC.H < prev    next >
Text File  |  1991-08-05  |  1KB  |  34 lines

  1. /*    MXALLOC is written by Klaus Pedersen (micro@imada.dk), and
  2.  *    distributed, together with "NT_COMP" - the NoiseTracker Compiler
  3.  *    for Atari [MEGA] ST, STe and TT computers.
  4.  *
  5.  *
  6.  *Name           »extended memory allocation«
  7.  *----
  8.  *Gemdosnumber   0x44
  9.  *-----------
  10.  *Definition     void *Mxalloc(long amount, int type);
  11.  *----------
  12.  *Talk           The binding first try to allocate the memory with 
  13.  *----           GEMDOS function Mxalloc,  if this fails ("unknown 
  14.  *               Gemdos function"),  it then allocates  the memory 
  15.  *               with the standard function Malloc.
  16.  *               If amount == -1L the function returns the size of
  17.  *               the largest block in the choosen type of ram... 
  18.  *               (or ST ram if Mxalloc is unknown to GEMDOS). 
  19.  *               The parameter type can be one of the following :
  20.  *                  0 - ST ram needed (DMA sound/ACSI/VIDEO)
  21.  *                  1 - TT ram needed...
  22.  *                  2 - ST ram if possible else TT...
  23.  *                  3 - TT ram if possible else ST (SCSI/LAN)
  24.  *
  25.  *Returns        The function returns the startaddress of the block.
  26.  *-------        Mxalloc returns 0, if there was no memory of the 
  27.  *               choosen type.
  28.  */
  29.  
  30.  
  31. enum {MX_STON, MX_TTON, MX_STPR, MX_TTPR};
  32.  
  33. void *Mxalloc(long amount, int type);
  34.